﻿using Microsoft.CodeAnalysis;

namespace UIOC.CodeAnalysis.Diagnostics;

internal static class ImplementAttributeParameterMustBeInterfaceDiagnostic {

    public const string DiagnosticId = "UIOC0006";

    private const string Title = "'[Implement]' 参数类型分析";
    private const string MessageFormat = "'[Implement(typeof({0}))]' 中的参数 '{0}' 不是接口'";
    private const string Description = "'[Implement(typeof(TYPE))]' 中 ‘TYPE’ 需要是接口";
    private const string Category = "Usage";

    public static readonly DiagnosticDescriptor Rule = new(
        DiagnosticId,
        Title,
        MessageFormat,
        Category,
        DiagnosticSeverity.Error,
        isEnabledByDefault: true,
        description: Description
    );
}